package com.tongsys.server.config.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Component;

@Component
public class RedisService {
    @Autowired
    private RedisTemplate redisTemplate;


    public  void  redisSet(String key,Object value){
        redisTemplate.opsForValue().set(key,value);
    }

    public Object redisGet(String key){
        Object obj = redisTemplate.opsForValue().get(key);
        return obj;
    }



}
